<!doctype html>
<html class="no-js"
      xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="/admin/layout :: head">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<th:block th:replace="/admin/layout :: nav_main"></th:block>


<div class="am-cf admin-main">
    <!-- sidebar start -->
    <th:block th:replace="/admin/layout :: sidebar('home')"></th:block>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">管理员管理</strong> / <small>编辑</small></div>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12">
                <form th:action="@{'/admin/system/update/'+${user.id}}" method="post" class="am-form" autocomplete="off">
                    <div class="am-form-group">
                        <label>登录用户名</label>
                        <input type="text" name="username" readonly="readonly" th:value="${user.username}" autocomplete="off" required="required"/>
                    </div>

                    <div class="am-form-group">
                        <label>机构名称</label>
                        <input type="text" name="deptName" th:value="${user.deptName}" autocomplete="off"/>
                    </div>
                    <div class="am-form-group">
                        <label>姓名</label>
                        <input type="text" name="nickname" th:value="${user.nickname}" autocomplete="off" required="required"/>
                    </div>

                    <div class="am-form-group">
                        <label>密码</label>
                        <input type="text" name="passwd"/>
                    </div>

                    <div class="am-form-group">
                        <label>性别</label>
                        <select name="sex">
                            <option th:selected="${user.sex == 1}"  value="1">女</option>
                            <option th:selected="${user.sex == 2}" value="2">男</option>
                        </select>
                    </div>

                    <div class="am-form-group">
                        <label>备注</label>
                        <input type="text" name="notes" th:value="${user.notes}" placeholder="备注" autocomplete="off" />
                    </div>

                    <div th:text="${message}" style="color: red;"></div>
                    <button shiro:hasRole="ADMIN" type="submit" class="am-btn am-btn-secondary am-margin-top am-margin-bottom">提交</button>
                    <button type="button" onclick="history.back()"
                            class="am-btn am-margin-top am-margin-bottom">返回
                    </button>
                </form>

            </div>
        </div>

    </div>
    <!-- content end -->

</div>

<a href="#" class="am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}">
    <span class="am-icon-btn am-icon-th-list"></span>
</a>


<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="/javascript/jquery.min.js"></script>
<!--<![endif]-->
<script src="/javascript/amazeui.min.js"></script>
<script type="text/javascript" src="/javascript/amazeui.datetimepicker.min.js"></script>
<script src="/javascript/app.js"></script>

</body>
</html>
